<?php

declare(strict_types=1);

namespace App\Amqp;

use Hyperf\Amqp\Message\ProducerMessage;

/**
 * 延迟消息体
 * Class DelayProducerMessage
 * @package App\Amqp
 */
class DelayProducerMessage extends ProducerMessage
{
    /**
     * @var integer 延迟时间（秒）
     */
    protected $ttl;

    /**
     * @param $ttl
     * @return $this
     */
    public function setTtl($ttl): self
    {
        $this->ttl = $ttl;
        return $this;
    }

    /**
     * @return int
     */
    public function getTtl(): int
    {
        return $this->ttl;
    }

}